/**
    ATClab - scriptable Air Traffic Control simulations.
    Copyright (C) 2010 openatclab@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#ifndef __ATC_AIRCRAFTPARAM_HDR__
#define __ATC_AIRCRAFTPARAM_HDR__


#include "atc.h"
#include <map>
#include <vector>


namespace atc{


	/*!
	 * \struct atc::FlightPathDec
	 */
	struct FlightPathDesc {

		FlightPathDesc()
			: x(0), y(0), tz(0), dz(0), tv(0), dv(0)
		{}

		FlightPathDesc(
			double x, double y,
			double tz, double dz,
			double tv, double dv
		)
			: x(x), y(y), tz(tz), dz(dz), tv(tv), dv(dv)
		{}

		double x, y, tz, dz, tv, dv;

	};


	/*!
	 * \typedef atc::FlightPath
	 * \typedef atc::FlightPathIt
	 * \typedef atc::FlightPathCIt
	 */
	typedef std::vector<atc::FlightPathDesc> FlightPath;
	typedef atc::FlightPath::iterator FlightPathIt;
	typedef atc::FlightPath::const_iterator FlightPathCIt;


	/*!
	 * \struct atc::AircraftParam
	 */
	struct AircraftParam{

		AircraftParam( const char *id, const char *type_ )
			:callsign(  )
			,type(  )
			,launch( 0 )
			,oVelocity( NAN )
			,oAltitude( NAN )
			,flightpath( )
		{
			
			strcpy(const_cast<char*>(callsign), id);
			strcpy(const_cast<char*>(type), type_);
		}

		
		const char callsign[50];
		const char type[25];

		unsigned int launch;

		double oVelocity;
		double oAltitude;

		FlightPath flightpath;

	};


	/*!
	 * \typedef AircraftParamMap
	 * \typedef AircraftParamMapIt
	 * \typedef AircraftParamMapCIt
	 */
	typedef std::map<std::string, atc::AircraftParam>AircraftParamMap;
	typedef AircraftParamMap::iterator AircraftParamMapIt;
	typedef AircraftParamMap::const_iterator AircraftParamMapCIt;


};

#endif
